--
-- Mario Mod
--
-- Copyright (C) 2006 Palish & Anders
-- Released under the MIT license
--

include("shared.lua")

function GM:Initialize ()	
  self.BaseClass:Initialize()
end

function GM:PostProcessPermitted (name)
  return false
end

function GM:HUDPaint ()
  --surface.SetDrawColor(100, 150, 250, 200)
  --surface.DrawRect(40, 40, 32, 32)
  
  for x=1,32 do
    for y=1,25 do                                                                   
      self:DrawTile(x, y, math.random(0,255), math.random(0,255), math.random(0,255), math.random(0, 255))
    end
  end
end

function GM:DrawTile (x, y, r, g, b, a)
  -- 32x25
  
  local dx, dy, dw, dz -- Same on all resolutions
  
  dx = math.ceil(ScrW() / 32*(x-1))
  dy = math.ceil(ScrH() / 25*(y-1))
  dw = math.ceil(ScrW() / 32)
  dh = math.ceil(ScrH() / 25)
  
  surface.SetDrawColor(r, g, b, a)
  surface.DrawRect(dx, dy, dw, dh)
end
